package com.zhijian.warehouse.manage.controller.app;

import com.zhijian.response.annotation.Response;
import com.zhijian.warehouse.manage.entity.vo.request.SseMessageSearchVo;
import com.zhijian.warehouse.manage.service.AccessNotifyService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;

/**
 * 通道门设置 控制层
 *
 * @author auto
 * @version 1.0
 * @date 2024-11-03 15:31:18
 */
@Slf4j
@Controller
@Api(tags = "app消息监听")
@RequestMapping("/app")
public class AppSseMessageController {

    @Autowired
    private AccessNotifyService accessNotifyService;

    /**
     * 监听RFID
     *
     * @return
     */
    @Response
    @GetMapping(path = "/access/aio/getRfId")
    @ApiOperation("监听RFID")
    public String insert(HttpServletRequest request) {
        return accessNotifyService.getReadEpc(SseMessageSearchVo.builder().build(),request);
    }
}
